package org.pluslibs.framework.swingplus.factory;

import javax.swing.BorderFactory;
import javax.swing.JComboBox;
import javax.swing.JTextArea;
import javax.swing.JTextField;

public class JFieldsFactory {

    public static JTextArea buildJTextArea(JFieldConstraints fc) {
        JTextArea component = new JTextArea(fc.getTextAreaRows(), fc.getColumns());
        component.setBorder(BorderFactory.createLineBorder(fc.getBorderColor()));
        return component;
    }

    public static JTextField buildJTextField(JFieldConstraints fc) {
        return new JTextField(fc.getColumns());
    }

    public static JComboBox buildJComboBox(String[] values, JFieldConstraints fc) {
        return new JComboBox(values);
    }
}
